import axios from "@/utils/request";


// 列表查询
export const getProListAPI = (data = {}, option = {}) => axios.get("/pro/list", {
    params: data,
    ...option
})

export const getRecommendListAPI = (data = {}, option = {}) => axios.get("/pro/recommendlistt", {
    params: data,
    ...option
})
export const getSeckillListAPI = (data = {}, option = {}) => axios.get("/pro/seckilllist", {
    params: data,
    ...option
})



/**
 * @description 产品的分类列表
 * 
 * @param data 请求参数
 * @param option 请求配置项
 * 
 * @return Promise
*/
export const getCategoryListAPI = (data = {}, option = {}) => axios.get("/pro/categorylist", {
    params: data,
    ...option
})



/**
 * @description 产品分类下品牌列表
 * 
 * @param data 请求参数
 * @param option 请求配置项
 * 
 * @return Promise
*/
export const getBrandListAPI = (data = {}, option = {}) => axios.get("/pro/categorybrandlist", {
    params: data,
    ...option
})

/**
 * @description 获取某分类下某品牌的产品列表
 * 
 * @param data 请求参数
 * @param option 请求配置项
 * 
 * @return Promise
*/
export const getCategoryBrandProListAPI = (data = {}, option = {}) => axios.get("/pro/categorybrandprolist", {
    params: data,
    ...option
})


/**
 * @description 获取产品的详情数据
 * 
 * @param data 请求参数
 * @param option 请求配置项
 * 
 * @return Promise
*/
export const getDetailAPI = (data: any = {}, option = {}) => axios.get("/pro/detail/" + data.proid, {
    ...option
})


/**
 * @description 搜索列表
 * 
 * @param data 请求参数
 * @param option 请求配置项
 * 
 * @return Promise
*/
export const getProSearchAPI = (data: any = {}, option = {}) => axios.get("/pro/search" + data.proid, {
    ...option
})


/**
 * @description 热门搜索列表
 * 
 * @param data 请求参数
 * @param option 请求配置项
 * 
 * @return Promise
*/
export const getHotProSearchAPI = (data: any = {}, option = {}) => axios.get("/pro/hotword" + data.proid, {
    ...option
})

